3.6 \(\int \csc (c+d x) (a+a \sec (c+d x)) \, dx\)

Optimal. Leaf size=30 \[ \frac{a \log (1-\cos (c+d x))}{d}-\frac{a \log (\cos (c+d x))}{d} \]

[Out]

(a*Log[1 - Cos[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.058121, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.353, Rules used = {3872, 2836, 12, 36, 31, 29} \[ \frac{a \log (1-\cos (c+d x))}{d}-\frac{a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]*(a + a*Sec[c + d*x]),x]

[Out]

(a*Log[1 - Cos[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rubi steps

\begin{align*} \int \csc (c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc (c+d x) \sec (c+d x) \, dx\\ &=\frac{a \operatorname{Subst}\left (\int \frac{a}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{a^2 \operatorname{Subst}\left (\int \frac{1}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac{a \operatorname{Subst}\left (\int \frac{1}{-a-x} \, dx,x,-a \cos (c+d x)\right )}{d}-\frac{a \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{a \log (1-\cos (c+d x))}{d}-\frac{a \log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [B]  time = 0.035584, size = 63, normalized size = 2.1 \[ \frac{a \log \left (\sin \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{a \log \left (\cos \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{a (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]*(a + a*Sec[c + d*x]),x]

[Out]

-((a*Log[Cos[c/2 + (d*x)/2]])/d) + (a*Log[Sin[c/2 + (d*x)/2]])/d - (a*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]))
/d

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 15, normalized size = 0.5 \begin{align*}{\frac{a\ln \left ( -1+\sec \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)*(a+a*sec(d*x+c)),x)

[Out]

1/d*a*ln(-1+sec(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.03157, size = 35, normalized size = 1.17 \begin{align*} \frac{a \log \left (\cos \left (d x + c\right ) - 1\right ) - a \log \left (\cos \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(cos(d*x + c) - 1) - a*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.68715, size = 81, normalized size = 2.7 \begin{align*} -\frac{a \log \left (-\cos \left (d x + c\right )\right ) - a \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-(a*log(-cos(d*x + c)) - a*log(-1/2*cos(d*x + c) + 1/2))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \csc{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \csc{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x)

[Out]

a*(Integral(csc(c + d*x)*sec(c + d*x), x) + Integral(csc(c + d*x), x))

________________________________________________________________________________________

Giac [A]  time = 1.44812, size = 78, normalized size = 2.6 \begin{align*} \frac{a \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - a \log \left ({\left | -\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - a*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)))
/d